Conversation
c422886 to
83aa348
Compare
|
As per item 5.1 of the PSR:
I've found some occurrences in diff --git a/lib/Doctrine/Migrations/Generator/SqlGenerator.php b/lib/Doctrine/Migrations/Generator/SqlGenerator.php
index 8c92c12..9868a28 100644
--- a/lib/Doctrine/Migrations/Generator/SqlGenerator.php
+++ b/lib/Doctrine/Migrations/Generator/SqlGenerator.php
@@ -47,8 +47,10 @@ class SqlGenerator
$storageConfiguration = $this->configuration->getMetadataStorageConfiguration();
foreach ($sql as $query) {
- if ($storageConfiguration instanceof TableMetadataStorageConfiguration
- && stripos($query, $storageConfiguration->getTableName()) !== false) {
+ if (
+ $storageConfiguration instanceof TableMetadataStorageConfiguration
+ && stripos($query, $storageConfiguration->getTableName()) !== false
+ ) {
continue;
}and diff --git a/lib/Doctrine/Migrations/Provider/LazySchemaDiffProvider.php b/lib/Doctrine/Migrations/Provider/LazySchemaDiffProvider.php
index 0d0df44..3606bd2 100644
--- a/lib/Doctrine/Migrations/Provider/LazySchemaDiffProvider.php
+++ b/lib/Doctrine/Migrations/Provider/LazySchemaDiffProvider.php
@@ -81,8 +81,10 @@ class LazySchemaDiffProvider implements SchemaDiffProvider
/** @return string[] */
public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema) : array
{
- if ($toSchema instanceof LazyLoadingInterface
- && ! $toSchema->isProxyInitialized()) {
+ if (
+ $toSchema instanceof LazyLoadingInterface
+ && ! $toSchema->isProxyInitialized()
+ ) {
return [];
}Is it something that we want? 👍or 👎 |
There was a problem hiding this comment.
@carusogabriel would you please add a test for the multiline thing (and to any other sniff we're implicitly adding here)?
|
@lcobucci Yes sir :) I'll add for the following ones that I've found:
Also, as already reported in squizlabs/PHP_CodeSniffer#460, looks like we need to exclude |
alcaeus
left a comment
There was a problem hiding this comment.
Only a minor suggestion, rest LGTM once tests have been added 🎉
81ba736
83aa348 to
81ba736
Compare
81ba736 to
ffa59fd
Compare
|
@carusogabriel might want to revisit those build failures though ;) |
|
@alcaeus Yeah, I'm trying to figure the |
ffa59fd to
6abaf58
Compare
|
🚀 |
This PR proposes that the Doctrine's CS adopts PSR-12 as the base for our standards, with a few changes, as voted in the past.
Important changes:
SlevomatCodingStandard.ControlStructures.NewWithParentheseswas dropped in favor ofPSR12.Classes.ClassInstantiation, in specificPSR12.Classes.ClassInstantiation.MissingParenthesestests/fixed/binary_operators.phpwas added to ensure the behaviour of a new rule:PSR12.Operators.OperatorSpacing(will close implement new sniff to force spaces after=#123, Add sniff to ensure spaces around binary operators #126 as well Add custom sniffs to address spacing of operators #134 if approved)